import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './permission'
import '@/assets/style/index.scss' // global css
import {startLoading, endLoading} from '@/utils/loadingUtil'
import {parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree} from "@/utils/baseUtil";
import {getDicts} from "@/api/system/dict/data";
import ListPageContainer from '@/views/components/ListPageContainer'
import InfoPageContainer from '@/views/components/InfoPageContainer'
import directive from './directive' // directive
import './assets/icons' // icon
import "@riophae/vue-treeselect/dist/vue-treeselect.css";

import larkMap from 'lark-map'
import 'lark-map/dist/lark-map.css'

Vue.use(larkMap)

// 字典数据组件
import DictData from '@/components/DictData'

DictData.install()
import DictTag from '@/components/DictTag'
import Pagination from "@/components/Pagination";
import {LOGICAL} from "@/constantData";

import DrawerContent from "@/views/components/DrawerContent/index.vue";

Vue.mixin({
  data() {
    return {
      LOGICAL
    }
  }
})
Vue.use(directive)
Vue.component('DictTag', DictTag)
Vue.component('Pagination', Pagination)
Vue.component('ListPageContainer', ListPageContainer)
Vue.component('InfoPageContainer', InfoPageContainer)
Vue.component('DrawerContent', DrawerContent)

import plugins from './plugins' // plugins
Vue.use(plugins)

// 全局方法挂载
Vue.prototype.getDicts = getDicts
Vue.prototype.parseTime = parseTime
Vue.prototype.resetForm = resetForm
Vue.prototype.addDateRange = addDateRange
Vue.prototype.selectDictLabel = selectDictLabel
Vue.prototype.selectDictLabels = selectDictLabels
Vue.prototype.handleTree = handleTree
Vue.prototype.startLoading = startLoading
Vue.prototype.endLoading = endLoading

import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css';

Vue.use(Element)


import {Splitpanes, Pane} from 'splitpanes'
import 'splitpanes/dist/splitpanes.css'

Vue.use(Splitpanes)
Vue.use(Pane)

import _ from 'lodash';

Vue.prototype._ = _

import VCharts from 'v-charts'

Vue.use(VCharts)

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
